<template>
 <div>
   <myForm :list="formList"
           @submitForm="searchPage"
           @resetForm="resetForm" />
   <hr>
   <A></A>
   <B></B>
   <div v-copy>132</div>
   <div>{{sex | getSex}}</div>
   <div>{{"13485755520" | hiddenPhone}}</div>
   <el-input  v-model="sex"></el-input>
   <div v-xx>xxx</div>
   <div v-color>xxx</div>
   <div v-color>xxx</div>
<!--   <div v-drag>xxx</div>-->
    <el-input v-model="sex" v-debounceInput:3000="d"></el-input>
    <el-input v-model="sex2" v-throttleInput:2000="t"></el-input>
   <el-dialog
     v-elDragDialog
     title="提示"
     :visible.sync="dialogVisible"
     width="30%"
     :before-close="handleClose">
     <span>这是一段信息</span>
     <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
   </el-dialog>
   <el-button @click="dialogVisible=true">点击</el-button>
 </div>
</template>

<script>
  import myForm from "./components/myForm";
  export default {
    components: {
      myForm,
    },

    data () {
      return {
        dialogVisible:false,
        sex:"0",
        sex2:11,
        formList: [
          { label: '编号', model: 'applyNumber', placeholder: '请输入编号' },
          { label: '名称', model: 'name', placeholder: '请输入名称' },
          { type: 'date-picker', label: '开始时间', model: 'startTime', valueFormat: 'yyyy-MM-dd HH:mm:ss', placeholder: '请选择开始时间' },
          { type: 'select', label: '状态', model: 'status', placeholder: '请选择状态', options: [] },
        ],
      };
    },
    methods: {
      // 可以取到子组件传递过来的数据
      searchPage (ruleForm) {
        console.log(ruleForm, 'ruleForm');
      },
      resetForm () {

      },
      handleClose(done) {
        console.log("做一些事情")
        /* this.$confirm('确认关闭？')
           .then(_ => {

             done();
           })
           .catch(_ => {});*/
      },
      d(){
        console.log(this.sex)
      },
      t(){
        console.log(this.sex2)
      }
    },
  };
</script>
